#include <unistd.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_log.h"
#include "driver/uart.h"
#include "string.h"
#include "driver/gpio.h"
#include "Custom_Config.h"

#include "cstm_gpio.h"
#include "driver/gpio.h"
#include "comm_motor.h"

int solenoid_switch_init(int type) {
    // gpio init
    init_gpio_output(IO3);
    return 0;
}

int solenoid_switch_start(int step_ms, bool clockWise) {
    set_gpio(IO3, step_ms > 0);
    vTaskDelay(step_ms/ portTICK_PERIOD_MS);
    set_gpio(IO3, 0);
    return 0;
}
